#include <stdio.h>

// 函数声明
int sum(int m, int n);

int main(void)
{
    int m, n, result;
    scanf("%d%d", &m, &n);
    result = sum(m, n);
    printf("%d\n", result);
    return 0;
}

// 函数定义
int sum(int m, int n)
{
    int total = 0;
    for (int i = m; i <= n; i++)
        total += i;
    return total;
}